/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.config;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URL;
import java.util.Properties;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author zhaoyawei
 */
public class ConfigSet extends HttpServlet{
    
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().write("hllllo");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println(req.getParameterNames());
        String filePath=req.getParameter("dbfile_path");
        Properties config=new Properties();
        
        URL url = this.getClass().getClassLoader().getResource(".");
//        FileInputStream filein = new FileInputStream("config.properties");
//        config.load(filein);
        System.out.println(url.toString());
//        config.setProperty("dbfile_path", filePath);
    
    }
    
}
